#include <iostream>

using namespace std;

typedef enum days { SUN, MON, TUE, WED, THU, FRI, SAT } days;

inline days operator+(days d)
{
	return static_cast<days>((d + 1) % 7);
}

ostream& operator<<(ostream& out, days d)
{
	switch(d) {
		case SUN: out << "SUN"; break;
		case MON: out << "MON"; break;
		case TUE: out << "TUE"; break;
		case WED: out << "WED"; break;
		case THU: out << "THU"; break;
		case FRI: out << "FRI"; break;
		case SAT: out << "SAT"; break;
	}

	return out;
}

int main(void)
{
	days sun = SUN, mon;
	mon = +SUN;
	cout << sun << " and " << mon << endl;

	return 0;
}
